//
//  ZooBeanLogin.m
//  ZooNgonDoiOS
//
//  Created by Trung sound on 6/5/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "ZooBeanLogin.h"
#import "ValidCore.h"

@implementation ZooBeanLogin
@synthesize sUsername = _sUsername;
@synthesize sPass = _sPass;
@synthesize sEmail = _sEmail;

+ (BOOL) validateUser: (NSString*) username password: (NSString*) password {
    NSLog(@"Username length: %d", [ValidCore length:username min:5 max:20]);
    NSLog(@"Password length: %d", [ValidCore length:password min:6]);
    NSLog(@"Username content: %d", [ValidCore alpha_dash:username]);
    
    return [ValidCore length:username min:5 max:20] && [ValidCore length:password min:6] && [ValidCore alpha_dash:username];
}

@end
